<%@ Page language="c#" Codebehind="Basket.aspx.cs" AutoEventWireup="True" Inherits="CrossFactory.SiteNote.Admin.Basket" %>
<HTML>
	<HEAD>
		<title>Publish</title>
		<link href="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Stylesheets/StyleSheet.aspx" type="text/css" rel="stylesheet" />
		<script language="javascript" src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath  + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Scripts/popcalendar.aspx" type="text/javascript"></script>
		<script language="javascript" type="text/javascript" src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Scripts/website.js"></script>
		<script language="javascript" type="text/javascript">
			var subDialog;
			window.onfocus = ShowSubDialog;
			
			function OpenWindow(url)
			{
				subDialog = window.open(url, "subPageBasket", "channelmode=no,directories=no,fullscreen=no,location=no,menubar=no,resizable=yes,status=no,scrollbars=yes");
			}
			
			function ShowSubDialog()
			{
				try
				{
					subDialog.focus();
				}
				catch(ex)
				{
				}
			}
			
				
			function load()
			{
				ResizeDialogBoxSiteNote();
			}
			function ClosePage()
			{
				window.opener.navigate(window.opener.location);
				window.close();
			}
			function confirmSubmit()
			{
			    if(window.confirm("Do you want to publish the selected items ?"))
			    {
			        //document.getElementById('cmdSubmit').disabled=true;
			        document.getElementsByTagName('body')[0].style.cursor = 'wait';
				    return true;
				}
				else
				{
				    return false;
				}
			}
			
			function confirmApprove()
			{
				if(window.confirm("Do you want to approve the selected items ?"))
				{
			        //document.getElementById('cmdSubmit').disabled=true;
			        document.getElementsByTagName('body')[0].style.cursor = 'wait';
				    return true;
				}
				else
				{
				    return false;
				}
			}
			
			function confirmReject()
			{
				if(window.confirm("Do you want to reject the selected items ?"))
				{
			        document.getElementsByTagName('body')[0].style.cursor = 'wait';
				    return true;
				}
				else
				{
				    return false;
				}
			}
			
			function setScroll(val) 
			{
				document.Basket.scrollPos.value = val.scrollTop;
			}
			
			function scrollTo(what) 
			{
				document.getElementById(what).scrollTop = document.Basket.scrollPos.value;
			}

            function WaitCursor()
			{
			    document.getElementsByTagName('body')[0].style.cursor = 'wait';
			}
			
		</script>
	</HEAD>
	<body style="margin:0px" onload="javascript:scrollTo('scrollArea')">
		<form id="Basket" method="post" runat="server" onsubmit="WaitCursor();">
			<a id="size">

						<table height="100%" cellSpacing="0" cellPadding="0" width="100%" border="0">
							<tr id="globaltab2">
								<td>
									<div id="tab">
										<ul>
											<li class="tabpublishselected" runat="server" id="tab_publish"><asp:LinkButton ID="publishButton" Runat="server"></asp:LinkButton></li>
											<li class="tabapprove" runat="server" id="tab_approve"><asp:LinkButton ID="approveButton" Runat="server"></asp:LinkButton></li>
										</ul>
									</div>
								</td>
							</tr>
							<tr>

								<td id="PageContent" vAlign="top" align="left" width="100%" height="100%">
										
										<table cellSpacing="0" cellPadding="0" border="0"" width="100%">
											<tr>
												<td width="100%" valign="middle" align="left" class="cmMessage">
													<table border="0">
														<tr>
															<td align="left" colspan="2" style="padding-top:5px"><b><asp:Label ID="lblBasketCheckAll" Runat="server" CssClass="cmPropertiesBasket"></asp:Label></b></td>																
														</tr>
														<tr>
															<td align="left" style="background-color:#F6FAFF;padding:5px;"><span style="float:left;"><asp:CheckBox id="cmbSelectAll" runat="server" TextAlign="Left" Text="Select all" AutoPostBack="True" CssClass="cmProperties" oncheckedchanged="cmbSelectAll_CheckedChanged"></asp:CheckBox></span><span style="float:right;font-family: Verdana,Arial;font-size: 9px;font-weight: normal;">By user: <asp:DropDownList ID="ddlUsers" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlUsers_SelectedIndexChanged"></asp:DropDownList></span></td>
														</tr>
														<tr>
															<td align="left" style="padding-top:15px" colspan="2"><b><asp:Label ID="lblBasketSelected" Runat="server" CssClass="cmPropertiesBasket"></asp:Label></b></td>
														</tr>
														<tr>
															<td align="left" style="PADDING-LEFT:8px">
															<table class="basketPage" cellpadding="0" cellspacing="0">
															    <tr bgcolor="#d8e5f5">
																	<td width="120" class="cmTitleImg"><img src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/transp.gif" width="120px" height="1px" /></td>
																	<td width="100" class="cmTitleImg"><img src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/transp.gif" width="120px" height="1px" /></td>
																	<td style="width:16px;" class="cmTitleImg"><img src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/transp.gif" width="16px" height="1px" /></td>
																	<td width="50" class="cmTitleImg"><img src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/transp.gif" width="50px" height="1px" /></td>
																	<td width="165" class="cmTitleImg"><img src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/transp.gif" width="165px" height="1px" /></td>
																	<td width="130" class="cmTitleImg"><img src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/transp.gif" width="130px" height="1px" /></td>
																	<td width="150" class="cmTitleImg"><img src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/transp.gif" width="150px" height="1px" /></td>
																	<td width="75" class="cmTitleImg"><img src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/transp.gif" width="75px" height="1px" /></td>
																	<td width="100" class="cmTitleImg"><img src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/transp.gif" width="100px" height="1px" /></td>
																	<td width="80" class="cmTitleImg"><img src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/transp.gif" width="80px" height="1px" /></td>
																	<td></td>
																</tr>
																<tr bgcolor="#d8e5f5">
																	<td width="120" class="cmTitle"><asp:Label id="lblPageTitle" Font-Bold="True" runat="server" Visible="True">Page title</asp:Label></td>
																	<td width="100" class="cmTitle"><asp:Label id="lblPageName" Font-Bold="True" runat="server" Visible="True">Page name</asp:Label></td>
																	<td style="width:16px;"></td>
																	<td width="50" class="cmTitle"><asp:Label id="lblPageLang" Font-Bold="True" runat="server" Visible="True">Language</asp:Label></td>
																	<td width="165" class="cmTitle"><asp:Label id="lblLastModified" Font-Bold="True" runat="server" Visible="True">Last modified by</asp:Label></td>
																	<td width="130" class="cmTitle"><asp:Label id="lblModifyDate" Font-Bold="True" runat="server" Visible="True">Modify date</asp:Label></td>
																	<td width="150" class="cmTitle"><asp:Label id="lblPublishDate" Font-Bold="True" runat="server" Visible="True">Publish date</asp:Label></td>
																	<td width="75" class="cmTitle"><asp:Label id="lblPublish" Font-Bold="True" runat="server" Visible="True">Publish</asp:Label></td>
																	<td width="100" class="cmTitle"><asp:Label id="lblPageHistory" Font-Bold="True" runat="server" Visible="True">Page History</asp:Label></td>
																	<td width="80" class="cmTitle"><asp:Label id="lblPublishCompare" Font-Bold="True" runat="server" Visible="True">Compare</asp:Label></td>
																	<td></td>
																</tr>
															</table>
															<div id="scrollArea" style="OVERFLOW:auto;HEIGHT:300px" valign="top" onscroll="javascript:setScroll(this);">
															
																<table class="basketPage" cellpadding="0" cellspacing="0" style="background-color:#F6FAFF">
																	<asp:Repeater id="pageRepeater" runat="server">
																		<ItemTemplate>
																			<tr>
																				<td width="120" class="cmProperties"><%# DataBinder.Eval(Container.DataItem,"SiteNotePageInfo.Title") %></td>
																				<td width="100" class="cmProperties"><a target="_blank" href="<%# DataBinder.Eval(Container.DataItem,"SiteNotePageInfo.VirtualPath") %>" title="<%= ConfigurationManager.AppSettings["websiteUrl"] %><%# DataBinder.Eval(Container.DataItem,"SiteNotePageInfo.VirtualPath") %>"><%# DataBinder.Eval(Container.DataItem,"SiteNotePageInfo.Name") %></a></td>
																				<td style="width:16px;height:16px"><asp:Image ID="img" runat="server" Height="16px" Width="16px"></asp:Image></td>
																				<td width="50" class="cmProperties"><%# CrossFactory.SiteNote.Components.Language._GetPageLanguage((string)DataBinder.Eval(Container.DataItem,"SiteNotePageInfo.VirtualPath")) %></td>
																				<td width="150" class="cmProperties" ><a href="mailto:<%# DataBinder.Eval(Container.DataItem,"SiteNotePageInfo.Infos.LastModifiedByEmail") %>"> <img style="float:left" src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/basket/email.jpg" border="0" alt="Write a email to editor" /> <span><%# DataBinder.Eval(Container.DataItem,"SiteNotePageInfo.Infos.LastModifiedBy") %></a></span></td>
																				<td width="130" class="cmProperties" ><%# CrossFactory.SiteNote.Components.Utils.ConvertToCultureDateFormat((DateTime)DataBinder.Eval(Container.DataItem, "SiteNotePageInfo.Infos.lastModifiedOn")) %></span></td>
																				<td width="150" height="30">
																				<asp:CustomValidator id="CustomValidator1" ControlToValidate="txtbox" Display="Dynamic" ErrorMessage="Invalid date" OnServerValidate="ServerValidationDate" runat="server"/>
																				<asp:TextBox CssClass="txtPublish" ID="txtbox" Runat="server"></asp:TextBox></td>
																				<td width="75" align="center"><asp:CheckBox ID="chkbox" Runat="server" OnCheckedChanged="chkbox_CheckedChanged" AutoPostBack="True"></asp:CheckBox></td>
																				<td width="100" align="center" class="cmProperties"><a href="#" onclick="OpenWindow('<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/PageHistoric.aspx?pageUrl=<%# DataBinder.Eval(Container.DataItem,"SiteNotePageInfo.VirtualPath") %>')"><img src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/history.gif" border="0" alt="History" /></a></td>
																				<td width="80" align="center" class="cmProperties"><a href="#" id="linkCompare" runat="server"><img id="imgCompare" runat="server" border="0" alt="" /></a></td>
																				<td></td>
																			</tr>
																			<tr>
																				<td colspan="9" class="basketSeparation">&nbsp;</td>
																			</tr>
																		</ItemTemplate>
																	</asp:Repeater>
																	<tr>
																	<td width="120" class="cmTitleImg"><img src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/transp.gif" width="120px" height="1px" /></td>
																	<td width="100" class="cmTitleImg"><img src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/transp.gif" width="120px" height="1px" /></td>
																	<td style="width:16px;" class="cmTitleImg"><img src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/transp.gif" width="16px" height="1px" /></td>
																	<td width="50" class="cmTitleImg"><img src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/transp.gif" width="50px" height="1px" /></td>
																	<td width="165" class="cmTitleImg"><img src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/transp.gif" width="165px" height="1px" /></td>
																	<td width="130" class="cmTitleImg"><img src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/transp.gif" width="130px" height="1px" /></td>
																	<td width="150" class="cmTitleImg"><img src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/transp.gif" width="150px" height="1px" /></td>
																	<td width="75" class="cmTitleImg"><img src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/transp.gif" width="75px" height="1px" /></td>
																	<td width="100" class="cmTitleImg"><img src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/transp.gif" width="100px" height="1px" /></td>
																	<td width="80" class="cmTitleImg"><img src="<%= CrossFactory.SiteNote.Components.Utils._ApplicationPath + CrossFactory.SiteNote.Components.Settings._settings.VirtualPath %>/Admin/Images/transp.gif" width="80px" height="1px" /></td>
																	<td></td>
																</tr>		
																</table>
																</div>
																<input type="hidden" id="scrollPos" name="scrollPos" value="0" runat="server">
															</td>	
														</tr>
														<tr>
															<td>
																<asp:Label id="lblEmpty" runat="server" Visible="False" CssClass="cmMessage"></asp:Label>
															</td>
														</tr>
														
													</table>
												</td>
											</tr>
											
										</table>
										<table>
										    <tr>
											    <td align="left" colspan="2" style="padding-left:15px" width="100%"><asp:button id="cmdReject" runat="server" Text="Reject" Width="75" Height="23" CssClass="cmtext"></asp:button></td>
								                <td><asp:button id="cmdSubmit" runat="server" Text="Submit" Width="75" Height="23" CssClass="cmtext" onclick="cmdSubmit_Click"></asp:button></td>
								                <td style="padding-right:5px"><input type="button" id="Close" value="Cancel" onclick="window.close();" style="WIDTH:75px;HEIGHT:23px" class="cmtext"></td>
								                <td>&nbsp;</td>
											</tr>
										</table>
									
								</td>
							</tr>
						</table>
			</a>
			<script language="javascript">
				try{load();}
				catch(e){}
			</script>
		</form>
	</body>
</HTML>
